local que_tianzhao = fk.CreateSkill {
    name = "que_tianzhao",
    anim_type = "control",
    tags = { Skill.Compulsory, },
}
Fk:loadTranslationTable {
    ["que_tianzhao"] = "天照",
    [":que_tianzhao"] = "锁定技，你于回合内使用前两张牌时，获得两张与此牌不同类型的牌。",
}
que_tianzhao:addEffect(fk.CardUsing, {
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(que_tianzhao.name) and player.phase ~= Player.NotActive and
            data.card and player:usedSkillTimes(que_tianzhao.name, Player.HistoryPhase) < 2
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        if player:getMark("@@que_fuyun_ex-turn") > 0 then
            local cards = {}
            for _, type in ipairs({ "basic", "trick", "equip" }) do
                table.insertTable(cards, room:getCardsFromPileByRule(".|.|.|.|.|" .. type))
            end
            if #cards > 0 then
                room:moveCardTo(cards, Card.PlayerHand, player, fk.ReasonJustMove, que_tianzhao.name, nil, false, player)
            end
            room:setPlayerMark(player, "@@que_fuyun_ex-turn", 0)
        else
            local cid = room:getCardsFromPileByRule(".|.|.|.|.|^" .. data.card:getTypeString(), 2)
            if player:getMark("@@que_fuyun_up-turn") > 0 then
                player:setSkillUseHistory(que_tianzhao.name, 0, Player.HistoryPhase)
                room:setPlayerMark(player, "@@que_fuyun_up-turn", 0)
            end
            if #cid > 0 then
                room:obtainCard(player, cid, false, fk.ReasonPrey)
            end
        end
    end,
})
return que_tianzhao
